import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Layout from '@/view/layout'
import Home from '@/view/home'
import DetailsPage from '@/view/detailsPage'
import AboutMe from '@/view/aboutMe'
import UserCenter from '@/view/userCenter'
import Login from '@/view/login/login'
import Register from '@/view/login/register'
import Account from '@/view/login'
import ListPage from '@/view/listPage'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'layout',
      component: Layout,
      redirect: 'home',
      children: [
        {path: 'home', name: 'home', component: Home},
        {path: 'detailspage', name: 'detailspage', component: DetailsPage},
        {path: 'aboutme', name: 'aboutme', component: AboutMe},
        {path: 'usercenter', name: 'usercenter', component: UserCenter},
        {path: 'listpage', name: 'listpage', component: ListPage}
      ]
    },
    {
      path: '/account',
      name: 'account',
      component: Account,
      redirect: '/account/login',
      children: [
        {path: 'login', name: 'login', component: Login},
        {path: 'register', name: 'register', component: Register}
      ]
    }
  ]
})
